Skip to content

Make default scheme shared so generated projects ship with one#69

Merged
dadachi merged 3 commits into
mainfrom
share-default-scheme
May 8, 2026
Merged

Make default scheme shared so generated projects ship with one#69
dadachi merged 3 commits into
mainfrom
share-default-scheme

Conversation

@dadachi

@dadachi dadachi commented May 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Move NativeAppTemplate.xcscheme from xcuserdata/<user>.xcuserdatad/xcschemes/ to xcshareddata/xcschemes/.

xcuserdata/ is gitignored (correctly — it holds per-developer Xcode state), which means anyone cloning fresh opens the project without a scheme until Xcode auto-creates a default one. The auto-default omits the run-time environment-variable injection (NATIVEAPPTEMPLATE_API_DOMAIN, NATIVEAPPTEMPLATE_API_PORT, NATIVEAPPTEMPLATE_API_SCHEME) the substrate relies on, so the app silently falls back to api.nativeapptemplate.com and any local-dev workflow breaks.

Shared schemes are the conventional Xcode pattern for any project meant to be cloned by others — no per-user state in the file, just the build/run/test configuration plus the env-var injection block. Promoting the default scheme to shared makes the substrate work out-of-the-box for:

  • Fresh clones by external contributors
  • The nativeapptemplate-agent code generator's ./out/<slug>/ios/ outputs (the agent's iOS worker copies the substrate but skips xcuserdata; it does not skip xcshareddata, so the moved scheme rides along)

Companion PRs

  • NativeAppTemplate-iOS (paid) — same move
  • nativeapptemplate-agent#64 — agent-side env-bridge that mirrors NATIVEAPPTEMPLATE_API_* to the renamed <PRODUCT>_API_* at run time, so the agent's automated validation runs work even before users open the generated project in Xcode

Test plan

  • xcodebuild -scheme NativeAppTemplate -destination 'platform=iOS Simulator,name=iPhone 17,OS=26.2' build succeeds (CI covers this)
  • Fresh clone in a new directory shows the scheme in Xcode's Scheme dropdown without manual setup

🤖 Generated with Claude Code

Move NativeAppTemplate.xcscheme from xcuserdata/<user>/xcschemes/ to
xcshareddata/xcschemes/. xcuserdata is gitignored (correctly — it
holds per-developer Xcode state) which means anyone cloning fresh
opens the project without a scheme until Xcode auto-creates a default
one. The auto-default omits the run-time environment variable
injection (NATIVEAPPTEMPLATE_API_DOMAIN etc.) the substrate relies on,
so the app falls back to api.nativeapptemplate.com and dev workflows
break silently.

Shared schemes are conventional for any project meant to be cloned by
others — no per-user state in the file, just the build/run/test
configuration. Promoting the default scheme costs nothing and makes
the substrate work out-of-the-box for fresh clones, including the
nativeapptemplate-agent code generator's ./out/<slug>/ios/ outputs
(the agent's iOS worker copies the substrate but skips xcuserdata; it
does NOT skip xcshareddata, so the moved scheme rides along).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@dadachi dadachi merged commit 2905fc6 into main May 8, 2026
2 checks passed
@dadachi dadachi deleted the share-default-scheme branch May 8, 2026 23:20
dadachi added a commit that referenced this pull request Jun 10, 2026
* Fix list reload blink and bump to 3.2.4

ShopListView and ItemTagListView flashed a full-screen LoadingView
whenever they re-appeared (returning to a tab, popping back from a
detail). Each .task/onChange reload sets the view-model state to
.loading, which swapped already-populated content for the spinner and
back — a visible blink.

This makes .loading keep existing content on screen and only show
LoadingView on a true cold start (.initial, or .loading with no data
yet). Background refreshes now update in place.

Ports the relevant subset of nativeapptemplate/NativeAppTemplate-iOS#87
— only the list views that exist in this substrate (no AccountListView
here).

- Blink fix in ShopListView, ItemTagListView
- Bump to 3.2.4 (build 14) and update CHANGELOG
- README: document the now-shared scheme (per #69) and the
  git update-index --skip-worktree approach for keeping a personal
  LAN IP out of git, replacing the stale "uncheck Shared" instructions

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Bump project objectVersion 90 → 100

Xcode upgraded the project format on open. Matches upstream
NativeAppTemplate-iOS#87.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Scheme: set example API domain to 192.168.1.21

Match upstream NativeAppTemplate-iOS#87 and keep the README example
value in sync. This is an example placeholder; developers override it
locally and skip-worktree the scheme.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant